package rocky.freemanagementsystemserver.connectors;

import com.tuya.connector.api.annotations.Body;
import com.tuya.connector.api.annotations.GET;
import com.tuya.connector.api.annotations.POST;
import com.tuya.connector.api.annotations.Path;
import rocky.freemanagementsystemserver.bean.tuya.TuyaDeviceStatus
import rocky.freemanagementsystemserver.bean.tuya.TuyaDevicefunction
import rocky.freemanagementsystemserver.bean.tuya.TuyaSendCommandObject

import java.util.List;

interface DeviceConnector {

    /**
     * 根据设备 ID 获取设备状态信息。
     * @param deviceId
     * @return
     */
    @GET("/v1.0/iot-03/devices/{device_id}/status")
    fun getDeviceStatus(@Path("device_id") deviceId: String): List<TuyaDeviceStatus>;


    /**
     * 根据设备 ID 获取设备所支持的指令集。
     * @param deviceId
     * @return
     */
    @GET("/v1.0/iot-03/devices/{device_id}/functions")
    fun getDeviceFunctions(@Path("device_id") deviceId: String): TuyaDevicefunction;

    @POST("/v1.0/iot-03/devices/{device_id}/commands")
    fun SendCommand(@Path("device_id") deviceId:String,@Body comands: TuyaSendCommandObject): Boolean;
}
